<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>4.解构赋值</title>
</head>
<body>
<script>
  //对象的结构赋值是根据属性名称进行解构赋值的
  let zhao ={
    name: '赵本山'
    ,age: 18
    ,xiaopin: function () {
      console.log('我是白云，他是黑土，我78，他75')
    }
  }

  let {xiaopin} = zhao
  xiaopin()

  //数组的结构赋值是根据数组下标进行解构赋值的
  const F4 = ['小沈阳','刘能','赵四','宋小宝']
  let[xiao,liu,nigula,song] = F4
  console.log(xiao)
  console.log(liu)
  console.log(nigula)
  console.log(song)
</script>
</body>
</html>